package com.mulInterface;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:周次煜
 * Date: 2024-03-05
 * Time：20:27
 */
public class Testdemo3_5 {
    public static void sleep(Animal animal) {
        animal.Sleep();
    }
    public static void swim(Swim swim) {
        swim.swim();
    }

    public static void fly(Fly fly) {
        fly.fly();
    }

    public static void run(Run run) {
        run.run();
    }

    public static void main5(String[] args) {
            sleep(new Fash("小鱼儿"));
            swim(new Fash("大鱼儿"));
            swim(new Dusk("大黄鸭"));
            fly(new Bird("小白鸟"));
            run(new Dusk("大黄鸭"));
    }

}

